
local encrypt = require "libencrypt"

local src = "dd3strdkdk"
local r = encrypt.Md5(src)
print(" md5=", r)
local r = encrypt.Sha(src)
print(" Sha=", r)
local r = encrypt.HmacSha1("123", src)
print(" HmacSha1=", r)


local PRIVATE_KEY ="-----BEGIN RSA PRIVATE KEY-----\n"
			.."MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAJz9LAfzapIVeKgn\n"
			.."B9nKKKSx+4SqhoR7Az5h+V5AV5afq3vFx+WdvSoRLHjd0+EQtlH4BGgVAseytZQL\n"
			.."XvP+mrHb5LMcakYGjzjq6ghSoC2SIQhD25Ui6nsmbssmoOXbfgqYaaJat0AgU6X5\n"
			.."TcdnRnh0WMKd+RvxUZ/QGjSaGdCLAgMBAAECgYB9BaJrMo9Mh4zvXSYDa9uyTYvg\n"
			.."u20lVFHg/GV7igI3EjGfAIOReW2McuDX4NE8C/MmlD3uJc1w/AFfRS75YWoPu4fP\n"
			.."KUEoH8R11z2UxVmAyVvZgL399ZaRV4USmFOdHgvrp3/rtdF8p7PLQ+AzmCWM0d8Y\n"
			.."3OpzRkxxGw7/jNPJAQJBAM1zuZqAgGG+xpYMqjtNtmSXO7GlWe+V/RNmP+7mNJen\n"
			.."VhVL8/1L46lCWKvO+Y6ed3LA0gOJG5Ft6dz331x1cQ8CQQDDnQcURptCpzemY1n+\n"
			.."7GmCJ9e7YHWmb+0h1aO3TnFLzJy3U5SsilkzzvjmUSu+yqrguwvG1zN2BafxkGM7\n"
			.."CTDFAkAfLTV4DZHtwz5tXKSkdSl9YDmtvnLEWZVa0URYY1SNwtXcS3dN86srbyb3\n"
			.."g2P5UXC82CfGY5LsYaqAXpjldejfAkEAnSnZ2TmNXvUY6i9izEXH05INa3fprsq4\n"
			.."nHmYqxt0PbFsrIKTrjkNyGlfYzUOT6Fnv12o7Z5Ts1yB/bzDbVhJ/QJAN17Ah0Ge\n"
			.."Wtg6RRqUJ/91rF/4ghXb32OyZkr6vxNjwnCaTLHXfXdMmTgLHgPHLg2OiiYJse5f\n"
			.."22kNZHlkHwtocw==\n"
			.."-----END RSA PRIVATE KEY-----\n"

local base_str = "abc";
local r = encrypt.RSA(PRIVATE_KEY, base_str);
print(" RSA=", r)
			